<div ng-controller="VenueBookCtrl">
    <div class="bg-light lter b-b wrapper-md">
        <h1 class="m-n font-thin h3">{{::venue.Name}}</h1>
    </div>
    <div class="wrapper-md">
        <div class="row">
            <div class="col-md-2">
                <div class="input-group">
                    <span class="input-group-addon">
                        <i class="fa fa-search"></i>
                    </span>
                    <input class="form-control" ng-model="searchKey" placeholder="可输入手机号进行筛选" />
                </div>
            </div>
            <div class="col-md-2">
                <div class="btn-group" ng-click="showCldnr=!showCldnr" id='btn-toggle-cldnr'>
                    <button class="btn">
                        <i class="fa fa-calendar"></i>
                    </button>
                    <button class="btn btn-success">日历</button>
                </div>
            </div>

             <div class="col-md-2">
                <div class="btn-group" ng-click="book()" id='btn-toggle-venue-book'>
                    <button class="btn">
                        <i class="fa fa-book"></i>
                    </button>
                    <button class="btn btn-primary">预定</button>
                </div>
            </div>
            
            <div class="fix-panel" ng-show="showCldnr" fix-to="#btn-toggle-cldnr" >
                <div clndr on-month-change="getBookedDays"></div>
            </div>           
        </div>
        <div class="row m-t-md">
            <div class="col-md-12">
                <table class="table table-bordered table-hover">
                    <tr>
                        <th>预定人</th>
                        <th>联系电话</th>
                        <th>预定时间</th>
                        <th>申请用途</th>
                        <th>预定时段</th>
                        <th>审核状态</th>
                        <th></th>
                    </tr>
                    <tr ng-repeat="r in recordList|filter:{BookPhone:searchKey}"  ng-class="{'text-red':r.Status==2}">
                        <td>{{::r.BookName}}</td>
                        <td>{{::r.BookPhone}}</td>
                        <td>{{::r.BookTime|date:'yyyy-MM-dd HH:mm'}}</td>
                        <td>
                            <p>{{::r.Reason}}</p>
                        </td>
                        <td>
                            <p ng-repeat="d in r.Days">{{::d.Day+' '+d.BookType}}</p>
                        </td>
                        <td>{{r.Status==1?'通过':r.Status==2?'未通过':'未审核'}}</td>
                        <td>
                            <a href="javascript:;" ng-click="audit(r)"><i class="fa fa-th-large"></i>审核</a>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>  
</div>